package yzpln.lanou.com.iamsinger.activity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;

/**
 * Created by dllo on 15/11/17.
 */
public abstract class BaseActivity extends AppCompatActivity {
    private View view;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getView());
        initView();
        initData();
    }

    public <T extends View> T findId(int id) {
        T t = (T) view.findViewById(id);
        return t;
    }

    abstract int getView();

    abstract View initView();

    abstract View initData();
}
